package com.tcm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tcm.entity.SocialClazz;
import com.tcm.entity.dto.SocialClazzUpdateDto;
import com.tcm.entity.dto.param.SocialClazzPageParam;
import com.tcm.entity.dto.param.SocialClazzSetTeacherParam;
import com.tcm.entity.resp.PageR;
import com.tcm.exception.EntityInvalidException;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 社会化班级业务接口
 * @author Guqier
 * @version 1.0
 * @date 2023/7/23 19:37
 */
public interface SocialClazzService extends IService<SocialClazz> {
    boolean addSocialClazz(SocialClazzUpdateDto dto, Long currUserId) throws EntityInvalidException;

    boolean modifySocialClazz(SocialClazzUpdateDto dto, Long currUserId) throws EntityInvalidException;

    @Transactional
    boolean removeSocialClazz(List<Long> ids, Long currUserId);

    PageR<SocialClazzUpdateDto> getSocialClazzListByPage(SocialClazzPageParam param);

    List<SocialClazzUpdateDto> getSocialClazzListByProjectId(Long projectId) throws EntityInvalidException;

    List<SocialClazz> getSocialClazzListWithoutLogicDelete();

    @Transactional
    boolean setSocialClazzTeacher(SocialClazzSetTeacherParam param, Long currUserId);

    List<SocialClazzUpdateDto> transferSocialClazzToDto(List<SocialClazz> socialClazzList);

    List<SocialClazzUpdateDto> getSocialClazzListAccordingToTeacher(Long currUserId);
}
